<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui, viewport-fit=cover">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>My App</title>
    <link rel="stylesheet" href="../../packages/core/css/framework7.min.css">
    <link rel="stylesheet" href="../../css/framework7-icons.css">
  </head>
  <body>
    <div id="app"></div>
    <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
    <script src="https://unpkg.com/react@16.4.1/umd/react.production.min.js"></script>
    <script src="https://unpkg.com/react-dom@16.4.1/umd/react-dom.production.min.js"></script>
    <script src="../../packages/react/framework7-react.min.js"></script>
    <script src="../../packages/core/js/framework7.min.js"></script>
    <script type="text/babel">
      class AppComponent extends React.Component {
        constructor() {
          super();
          this.deleteChipBound = this.deleteChip.bind(this);
          this.state = {
      
          };
        }
        deleteChip(e) {
          const $$ = this.$$;
          const app = this.$f7;
          const target = e.target;
          app.dialog.confirm('Do you want to delete this tiny demo Chip?', () => {
            $$(target).parents('.chip').remove();
          });
        }
        render() {
          return (
            <App>
              <View main>
                <Page>
                  <Navbar title="Chips"></Navbar>
                  <BlockTitle>Chips With Text</BlockTitle>
                  <Block strong>
                    <Chip text="Example Chip" />
                    <Chip text="Another Chip" />
                    <Chip text="One More Chip" />
                    <Chip text="Fourth Chip" />
                    <Chip text="Last One" />
                  </Block>
                  <BlockTitle>Outline Chips</BlockTitle>
                  <Block strong>
                    <Chip outline text="Example Chip" />
                    <Chip outline text="Another Chip" />
                    <Chip outline text="One More Chip" />
                    <Chip outline text="Fourth Chip" />
                    <Chip outline text="Last One" />
                  </Block>
                  <BlockTitle>Icon Chips</BlockTitle>
                  <Block strong>
                    <Chip text="Add Contact" mediaBgColor="blue">
                      <Icon slot="media" ios="f7:add_round" md="material:add_circle"></Icon>
                    </Chip>
                    <Chip text="London" mediaBgColor="green">
                      <Icon slot="media" ios="f7:compass" md="material:location_on"></Icon>
                    </Chip>
                    <Chip text="John Doe" mediaBgColor="red">
                      <Icon slot="media" ios="f7:person" md="material:person"></Icon>
                    </Chip>
                  </Block>
                  <BlockTitle>Contact Chips</BlockTitle>
                  <Block strong>
                    <Chip text="Jane Doe">
                      <img slot="media" src="http://lorempixel.com/100/100/people/9/" />
                    </Chip>
                    <Chip text="John Doe">
                      <img slot="media" src="http://lorempixel.com/100/100/people/3/" />
                    </Chip>
                    <Chip text="Adam Smith">
                      <img slot="media" src="http://lorempixel.com/100/100/people/7/" />
                    </Chip>
                    <Chip text="Jennifer" mediaBgColor="pink" media="J" />
                    <Chip text="Chris" mediaBgColor="yellow" mediaTextColor="black" media="C" />
                    <Chip text="Kate" mediaBgColor="red" media="K" />
                  </Block>
                  <BlockTitle>Deletable Chips / Tags</BlockTitle>
                  <Block strong>
                    <Chip text="Example Chip" deleteable onClick={ this.deleteChipBound } />
                    <Chip text="Chris" media="C" mediaBgColor="orange" textColor="black" deleteable onClick={ this.deleteChipBound } />
                    <Chip text="Jane Doe" deleteable onClick={ this.deleteChipBound }>
                      <img slot="media" src="http://lorempixel.com/100/100/people/9/"/>
                    </Chip>
                    <Chip text="One More Chip" deleteable onClick={ this.deleteChipBound } />
                    <Chip text="Jennifer" mediaBgColor="pink" media="J" deleteable onClick={ this.deleteChipBound } />
                    <Chip text="Adam Smith" deleteable onClick={ this.deleteChipBound }>
                      <img slot="media" src="http://lorempixel.com/100/100/people/7/"/>
                    </Chip>
                  </Block>
                  <BlockTitle>Color Chips</BlockTitle>
                  <Block strong>
                    <Chip text="Red Chip" color="red" />
                    <Chip text="Green Chip" color="green" />
                    <Chip text="Blue Chip" color="blue" />
                    <Chip text="Orange Chip" color="orange" />
                    <Chip text="Pink Chip" color="pink" />
                    <Chip outline text="Red Chip" color="red" />
                    <Chip outline text="Green Chip" color="green" />
                    <Chip outline text="Blue Chip" color="blue" />
                    <Chip outline text="Orange Chip" color="orange" />
                    <Chip outline text="Pink Chip" color="pink" />
                  </Block>
                </Page>
              </View>
            </App>
          )
        }
      }
    </script>
    <script>
      var theme = 'ios';
      if (location.href.indexOf('theme=md') >= 0) theme = 'md';
      
      if (Framework7.use) Framework7.use(Framework7React, { theme: theme });
      else if (Framework7.Class && Framework7.Class.use) Framework7.Class.use(Framework7React, { theme: theme });
      
      var plugin = {
        params: {
          theme: theme,
        }
      };
      
      if (Framework7.use) Framework7.use(plugin);
      else if (Framework7.Class && Framework7.Class.use) Framework7.Class.use(plugin);
      
      window.onload = function () {
        if (typeof AppComponent !== 'undefined') {
          ReactDOM.render(
            React.createElement(AppComponent),
            document.getElementById('app')
          );
        }
      }
    </script>
  </body>
</html>